import yaml

# 设定指定YMAL文件中配制到APP
def set_app_mainfest(app, path):
    mainfest = load_mainfest(path)
    app.config.update(mainfest)

# 加载指定YAML文件中的配制
def load_mainfest(path):
    with open(path, 'r', encoding='utf-8') as file:
        file_stream = file.read()
        mainfest = yaml.safe_load(file_stream)
    return mainfest
